package com.rran.study.designpattern.behavioral.observer.listener.app;

import com.rran.study.designpattern.behavioral.observer.event.app.OrderEvent;
import com.rran.study.designpattern.behavioral.observer.event.app.SmokeEvent;
import com.rran.study.designpattern.behavioral.observer.model.OrderData;
import com.rran.study.designpattern.behavioral.observer.model.Smoke;

/**
 * @author yy
 * @Type AppPayListener.java
 * @Desc SmokeEvent监听者--抽烟者的父亲
 * @date 2020/7/21 19:42
 */
public class AppFatherListener implements AppListener<SmokeEvent> {
    @Override
    public void applicationEvent(SmokeEvent event) {
        this.scold(event.getSource());
    }

    /**
     * 辱骂
     */
    private void scold(Smoke smoke) {
        System.out.println("观察者爸爸：才" + smoke.getNumber() + "根,太少了！");
    }

}
